import os
from selenium自动化.utils import Func

from selenium import webdriver

# WebDriver路径
projectPath = str(os.path.abspath(os.path.dirname(__file__))).split('program')[0]
driver_path = projectPath + "/utils/chromedriver.exe"
driver = Func.create_chrome_driver(driver_path, local_port=9221)

# 放大网页
try:
    driver.maximize_window()
except:
    pass

driver.get('chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/home.html#')
# 待打开的URL列表
urls = ['http://www.baidu.com', 'http://www.google.com', 'http://www.taobao.com']

# 打开浏览器
for url in urls:
    driver = webdriver.Chrome(driver_path)  # 将 'Chrome' 替换为您使用的浏览器
    driver.get(url)
